package com.lu.model.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

/**
 * @Description 系统方法日志
 * @Author: zhanglu
 * @Date: 2022/7/22 10:50
 */
@Data
public class SystemMethodLog {

  private Long id;
  private Long pid;
  private String ip;
  /**
   * 场景
   */
  private String scene;
  /**
   * code
   */
  private String code;
  /**
   * 包名#方法名
   */
  private String method;
  /**
   * 调用描述
   */
  private String description;

  /**
   * 创建时间
   */
  private String createTime;

  /**
   * 堆栈信息
   */
  private String stack;
  /**
   * 入参
   */
  private String inParams;
  /**
   * 出参
   */
  private String outParams;

  /**
   * 场景
   */
  @Getter
  @AllArgsConstructor
  public enum SCENE{

    INTEGRAL("积分"),
    ORDER("订单"),
    MOVIE("电影"),

    ;

    private String description;
  }

  /**
   * 日志代码
   */
  @Getter
  @AllArgsConstructor
  public enum Code{

    INTEGRAL_RECHARGE(SCENE.INTEGRAL, "积分充值"),
    INTEGRAL_DEDUCTION(SCENE.INTEGRAL, "积分扣减"),

    INTEGRAL_CARD_BIND(SCENE.INTEGRAL, "积分绑定"),

    ORDER_CREATE(SCENE.ORDER, "订单创建"),
    ORDER_CONFIRM(SCENE.ORDER, "订单确认"),
    ORDER_CALL_WXPAY(SCENE.ORDER, "订单唤起微信支付"),
    ORDER_WXPAY_SUCCESS(SCENE.ORDER, "订单微信支付-成功"),
    ORDER_WXPAY_FAILED(SCENE.ORDER, "订单微信支付-失败"),
    ORDER_WXPAY_NOTIFY(SCENE.ORDER, "订单微信支付-通知"),

    ORDER_CANCEL(SCENE.ORDER, "订单取消"),
    ORDER_SUBMIT(SCENE.ORDER, "订单提交"),
    ORDER_ADVANCE_SUBMIT(SCENE.ORDER, "订单提交（预占）"),
    ORDER_ADVANCE_CANCEL(SCENE.ORDER, "订单取消（预占）"),

    ORDER_HAS_PAY_CANCEL(SCENE.ORDER, "用户取消已支付的订单（排除已完成的）"),

    ORDER_SUBMIT_CONFIRM(SCENE.ORDER, "确认提交的预占库存的订单"),
    ORDER_CONFIRM_RECEIVED(SCENE.ORDER, "订单确认收货"),

    ORDER_CANCEL_JD(SCENE.ORDER, "订单取消-JD"),
    ORDER_CONFIRM_RECEIVED_JD(SCENE.ORDER, "订单确认收货-JD"),

    ORDER_PAY(SCENE.ORDER, "订单支付(积分扣减|微信支付)"),

    ORDER_WX_ORDER_CREATE(SCENE.ORDER, "订单支付-微信订单创建"),

    ORDER_WX_PAY_SUCCESS(SCENE.ORDER, "订单支付-微信支付-成功"),
    ORDER_WX_PAY_SUCCESS_CALLBACK(SCENE.ORDER, "订单支付-微信支付-成功-回调"),
    ORDER_WX_PAY_REFUND(SCENE.ORDER, "订单支付-微信支付后-退款"),


    ORDER_SUMBIT_YX(SCENE.ORDER, "网易订单提交"),
    ORDER_SUMBIT_JD(SCENE.ORDER, "京东订单提交"),

    ORDER_PAY_CANCEL(SCENE.ORDER, "订单取消支付"),

    DO_MOVIE_ORDER_CREATE(SCENE.ORDER, "电影订单创建"),
    DO_MOVIE_ORDER_NOTIFY(SCENE.ORDER, "电影订单通知(支付)"),
    DO_MOVIE_CALL_BACK(SCENE.MOVIE, "嘟电影 - 回调通知)"),

    CAKE_EVOUCHERS_ORDER_CREATE(SCENE.ORDER, "蛋糕电子券订单创建"),

    YX_ORDER_CALL_BACK(SCENE.ORDER, "YX订单回调")

    ;
    private SCENE scene;
    private String description;
  }




}
